app.service('z-holiday-s', [
		'$rootScope',
		'$z-http',
		'ZModel',
		function($rootScope, $http, ZModel) {
			var service = {
					getHolidayList : function(data,success,fault) {
						$http.post("holiday/getHolidayList.do",
							$.param(data),
							{headers: {'Content-Type': 'application/x-www-form-urlencoded; charset=UTF-8'}}
							).success(function(data) {
								success(data.success);
			  				}).error(function(data) {
			  					if(fault) {
			  						fault(data);
			  				}
		  				});
					},
					getHolidayListByPageCount : function(data,success,fault) {
						$http.post("holiday/getHolidayListByPageCount.do",data)
						.success(function(data) {
							success(data.success);
		  				}).error(function(data) {
	  						fault(data);
		  				});
					},
					getTemplateUrl:function (success, fault) {
		                $http.get("holiday/getHolidayURL.do", {
		                    headers: {
		                        'Content-Type': 'application/x-www-form-urlencoded; charset=UTF-8'
		                    }
		                }).success(success).error(fault);
		            },
		            importHoliday:function (data, success, fault) {
		                $http.post("holiday/importHoliday.do",
		                    $.param(data), {
		                        headers: {
		                            'Content-Type': 'application/x-www-form-urlencoded; charset=UTF-8'
		                        }
		                    }).success(success).error(fault);
		            },
		            deleteHoliday : function(data,success,fault) {
						$http.post("holiday/deleteHoliday.do",data)
						.success(function(data) {
							success(data.success);
		  				}).error(function(data) {
	  						fault(data);
		  				});
					},
			};
			return service;
		} ]);